package com.shopping.mall.core.module.type.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.poi.ss.formula.functions.T;

@Data
public class TypeLan {

    @ApiModelProperty(value="主键")
    @TableId(type = IdType.UUID)
    private String typeId;

    @ApiModelProperty(value="类型")
    private String type;

    @ApiModelProperty(value="父节点ID")
    private String parentId;

    @ApiModelProperty(value="级别（最高三级）")
    private Integer level;

    @ApiModelProperty(value="描述信息")
    private String description;

    @ApiModelProperty(value = "图片")
    private String photo;

    @ApiModelProperty(value = "语言ID")
    private String languageId;

    public TypeLan(String typeId, String type, String parentId, Integer level, String description, String languageId) {
        this.typeId = typeId;
        this.type = type;
        this.parentId = parentId;
        this.level = level;
        this.description = description;
        this.languageId = languageId;
    }

    public TypeLan() {
    }

    @JsonIgnore
    public Type getType(){
        return new Type(typeId,type,parentId,level,description,languageId);
    }

}
